




/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/08/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 
package com.application.usertable.service;
import java.util.List;
import com.manager.BaseService;
import com.manager.commons.page.PageBean;
import com.application.role.entity.Role;
import com.application.usertable.entity.RoleUser;
import com.application.usertable.entity.Usertable;
import com.application.usertable.struts.form.UsertableForm;
import com.application.usertable.dao.UsertableDAO;
 /**
 * 
 * Description:UsertableService<br />
 * 
 * Version:V0.1<br />
 * 
 * Author: 左磊 QQ：30575951    <br />
 * 
 * History: <br />
 * 
 * 02/08/2012 
 * 
 */
public class UsertableService extends BaseService
{
	private UsertableDAO usertableDAO;

	public UsertableDAO getUsertableDAO() {
		return this.usertableDAO;
	}

	public void setUsertableDAO(UsertableDAO usertableDAO) {
		this.usertableDAO = usertableDAO;
	}
        

        public Usertable getUsertable(Usertable usertable) {
		return (Usertable) this.getBaseDao().queryByPk(usertable, usertable.getId());
	}
	
	public Integer getAllCountUsertable(UsertableForm usertableForm){
		return this.usertableDAO.getAllCountUsertable(usertableForm);
	}
	
	public List<Usertable> searchUsertable(UsertableForm usertableForm, PageBean pageBean) throws Exception {
		List<Usertable> usertableList = (List) this.usertableDAO.searchUsertable(usertableForm, pageBean);
		return usertableList;
	}
        
        public void deleteUsertables(UsertableForm usertableForm){
	   this.usertableDAO.deleteUsertables(usertableForm);	 
	}
        public void deleteUserRole(String uid){
     	   this.usertableDAO.deleteUserRole(uid);	 
     	}
        public List<Role> getUserRole(String uid){ 
        	return this.usertableDAO.getUserRole(uid);	
        }
        public List searchUsertable(final UsertableForm usertableForm) {
    		List<Usertable> usertableList = (List) this.usertableDAO.searchUsertable(usertableForm);
    		return usertableList;
    	}
        public List<Usertable> getUserById(String rid){ 
        	List<Usertable> usertableList = (List) this.usertableDAO.getUserById(rid);
        	return usertableList;
        }
        public List<Usertable> getUserById(String rid,String oid){ 
        	List<Usertable> usertableList = (List) this.usertableDAO.getUserById(rid,oid);
        	return usertableList;
        }
        public List<Usertable> getUserByIdBm(String oid){ 
        	List<Usertable> usertableList = (List) this.usertableDAO.getUserByIdBm(oid);
        	return usertableList;
        }
        public List<Usertable> getUserByName(String rname,String oid){ 
        	List<Usertable> usertableList = (List) this.usertableDAO.getUserByName(rname,oid);
        	return usertableList;
        }
        public List<Usertable> getOrgUserserById(String uid){ 
        	return (List) this.usertableDAO.getOrgUserserById(uid);
        }
}
